test: avoid truncating watched worker deps#63083
Open
inoway46 wants to merge 1 commit intonodejs:mainfrom
Open
test: avoid truncating watched worker deps#63083inoway46 wants to merge 1 commit intonodejs:mainfrom
inoway46 wants to merge 1 commit intonodejs:mainfrom
Conversation
b27b615 to
da136db
Compare
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
da136db to
cfcd3e7
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63083 +/- ##
==========================================
- Coverage 91.49% 89.65% -1.84%
==========================================
Files 360 712 +352
Lines 151674 220498 +68824
Branches 23919 42278 +18359
==========================================
+ Hits 138772 197685 +58913
- Misses 12625 14664 +2039
- Partials 277 8149 +7872 🚀 New features to boost your workflow:
|
MoLow
approved these changes
May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a flaky
sequential/test-watch-mode-workerfailure where the nested CJS worker dependency case can log{}instead ofsub-dep v1.The test rewrites watched worker dependency files to trigger
--watchrestarts, but defaultwriteFileSync()temporarily truncates the file. A restarted worker can read the dependency during that empty-file window.This change keeps the write-based restart trigger, but uses
r+to overwrite without truncation.Reported in: https://github.com/nodejs/reliability/blob/main/reports/2026-05-02.md
Testing:
Refs: #62368